<?php
/* @var $this InventoryController */
/* @var $model Inventory */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'inventory-form',
	// Please note: When you enable ajax validation, make sure the corresponding
	// controller action is handling ajax validation correctly.
	// There is a call to performAjaxValidation() commented in generated controller code.
	// See class documentation of CActiveForm for details on this.
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'medicine_qty'); ?>
		<?php echo $form->textField($model,'medicine_qty',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'medicine_qty'); ?>
	</div>

	<div class="row">
                <?php echo $form->labelEx($model,'medicine_expry_date'); ?>
                        <?php $this->widget('zii.widgets.jui.CJuiDatePicker', array(
        'model'=>$model, 'attribute'=>'medicine_expry_date',
        'options'=>array(
            'dateFormat'=>'yy-mm-dd',
            'yearRange'=>'-20:+20',
            'changeYear'=>'true',
            'changeMonth'=>'true',
        ),
                )); ?>
                <?php echo $form->error($model,'medicine_del_date'); ?>

	<div class="row">
                <?php echo $form->labelEx($model,'medicine_del_date'); ?>
                        <?php $this->widget('zii.widgets.jui.CJuiDatePicker', array(
        'model'=>$model, 'attribute'=>'medicine_del_date',
        'options'=>array(
            'dateFormat'=>'yy-mm-dd',
            'yearRange'=>'-20:+20',
            'changeYear'=>'true',
            'changeMonth'=>'true',
        ),
                )); ?>
                <?php echo $form->error($model,'medicine_expry_date'); ?>


	<div class="row">
		<?php echo $form->labelEx($model,'pharmacy_id'); ?>
                <?php echo $form->dropDownList ($model, 'pharmacy_id', CHtml::listData(
                Pharmacy::model()->findAll(), 'id','pharmacy_name'),
                        array('prompt' => 'Select a pharmacy')
                        ); ?>
                <?php echo $form->error($model,'pharmacy_id'); ?>
        </div>

	<div class="row">
		<?php echo $form->labelEx($model,'product_id'); ?>
                <?php echo $form->dropDownList ($model, 'product_id', CHtml::listData(
                Product::model()->findAll(), 'id','medicine_name'),
                        array('prompt' => 'Select a product')
                        ); ?>
                <?php echo $form->error($model,'product_id'); ?>
        </div>

	<div class="row">
				<?php echo $form->labelEx($model,'medicinelocation_id'); ?>
                <?php echo $form->dropDownList ($model, 'medicinelocation_id', CHtml::listData(
                Medicinelocation::model()->findAll(), 'id','medicine_cabno'),
                        array('prompt' => 'Select a cab no.')
                        ); ?>
                <?php echo $form->error($model,'medicinelocation_id'); ?>
        </div>



<?php $this->endWidget(); ?>

</div><!-- form -->